<?php
header("content-type:image/jpg");
$name = $_GET['name']?$_GET['name']:"星狗网";
$enddate=date("y-m-d",time());
$bank = "-";
$start = $_GET['year'].$bank.$_GET['month'].$bank.$_GET['day'];
$startdate=strtotime($start);
$enddate=strtotime($enddate);
$days=round(($enddate-$startdate)/3600/24) +1;
//echo $days; //days为得到的天数;
$im = imagecreatetruecolor(960,720);
$bg = imagecreatefromjpeg('myday.jpg');
imagecopy($im,$bg,0,0,0,0,960,720);
imagedestroy($bg);
$black = imagecolorallocate($im, 255,255,255);
$text = $days;
$font = '../dazi/msyh.ttf';
imagettftext($im, 42, 0, 428,390, $black, $font, $text);
imagejpeg($im);
imagedestroy($im);
?>
